package LuoGu.搜索.过河卒;

import java.util.Scanner;

public class Main {
    //请千万注意x y 轴
    //注意高精度
    static int [] rx = new int []{1,1,-1,-1,2,2,-2,-2};
    static int [] ry = new int []{2,-2,2,-2,1,-1,1,-1};
    static boolean map [][];
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int r = s.nextInt();
        int c = s.nextInt();
        int y = s.nextInt();
        int x = s.nextInt();
        map = new boolean[r+1][c+1];
        map[y][x] = true;
        for(int i=0;i<8;i++){
            int nx = x+rx[i];
            int ny = y+ry[i];
            if(nx>=0&&ny>=0&&nx<=c&&ny<=r) map[ny][nx] = true;
        }
        long [][] temp = new long [r+1][c+1];
        if(r>1&&c>1){
            for(int i=1;i<=r;i++){
                if(map[i][0]!=true){
                    temp[i][0] = 1;
                }else break;
            }
            for(int i=1;i<=c;i++){
                if(map[0][i]!=true){
                    temp[0][i] = 1;
                }else break;
            }

            for(int i=1;i<=r;i++){
                for(int j=1;j<=c;j++){
                    if(map[i][j]);
                    else{
                        temp[i][j] = temp[i-1][j]+temp[i][j-1];
                    }
                }
            }
            System.out.print(temp[r][c]);
        }else{
            System.out.print("1");
        }
    }
}
